package com.aichat.ai_chatbackend.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.aichat.ai_chatbackend.model.entity.AiCharacter;
import com.aichat.ai_chatbackend.service.AiCharacterService;
import com.aichat.ai_chatbackend.mapper.AiCharacterMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author yuppie
* @description 针对表【ai_character(AI角色表)】的数据库操作Service实现
* @createDate 2025-07-13 14:40:37
*/
@Service
public class AiCharacterServiceImpl extends ServiceImpl<AiCharacterMapper, AiCharacter>
    implements AiCharacterService{

    private final static int IS_PUBLIC = 1;

    @Override
    public List<AiCharacter> getPublicCharacters() {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_public",IS_PUBLIC);
        return this.list(queryWrapper);
    }

    @Override
    public List<AiCharacter> getUserCharacters(Long userId) {
        return null;
    }

    @Override
    public void incrementUsageCount(Long characterId) {

    }
}




